<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>json</title>
	</head>
	<body>
		<h1>json</h1>
		<script>
			// var a = "1";
			// console.info(typeof(a));
			// var b = JSON.parse(a); //将字符串转为对象
			// console.info(typeof(b));
			// var c = JSON.stringify(b);
			// console.info(typeof(c));

			// var s1 = "a\"b";
			// // s1 = '"a\"b"';
			// var s1 = JSON.stringify(s1);
			// console.info(typeof(s1));
			
			console.info(typeof(`nihao`));
			console.info("---------");
			var n1 = 1;
			n1 = "1";
			n1 = JSON.parse(n1);
			console.info(n1+" "+typeof(n1));
			
			var b1 = true;
			b1 = "false";
			b1 = JSON.parse(b1);
			console.info(b1+" "+typeof(b1));
			
			var s1 = "ab\"c";
			s1 = '"ab\\"c"';
			s1 = JSON.parse(s1);
			console.info(s1);
			
			var obj1 = new Object();
			obj1.a = 1;
			obj1["b"] = "aa";
			console.info(obj1);
		</script>
	</body>
</html>
